package com.neusoft.response;

import lombok.*;

@Getter
@Setter
@ToString
@NoArgsConstructor
@AllArgsConstructor
public class Result {
    private int code;
    private String msg;
    private Object data;

    public static Result error() {
        return new Result(500, "服务器内部错误", null);
    }

    public static Result success(Object object) {
        return new Result(100, "请求成功", object);
    }

    public static Result tokenErr() {
        return new Result(400, "token认证失败", null);
    }
    
    public static Result notFoundErr(String msg) {
        return new Result(404, msg, null);
    }
}
